﻿@{
    ViewBag.Title = "Add";
    Layout = "~/Views/Shared/_JuiLayout.cshtml";

    string hostId = MyRequest.GetQueryString("hostId");
    string userName = selectControlBLL.getNameById("id", hostId, "Sys_IBUsers", "RealName");

    string rturl = "/SysMenu/List?menu=UserDepart&name=ListById&hostId=" + hostId;
}
@section header {}
<div id="layout" class="noNavTab">
    <div id="navTab">
        <div class="pageContent">
            <h2 class="contentTitle">
                部门权限添加</h2>
            <div class="pageFormContent nowrap" layouth="56">
                @{
                   
                    using (Html.BeginForm("Add", "OperateTotal", new { name = DencryptHelper.Encrypt("Sys_IBUserDeparts"), url = rturl }, FormMethod.Post, new { @class = "pageForm required-validate", onsubmit = "return validateCallback(this,navTabAjaxDone)" }))
                    {
                    <dl>
                        <dt>
                            用户：
                        </dt>
                        <dd>
                            @userName
                            @Html.Hidden("t0_UserId", hostId, new { @class = "digits required textInput" })
                        </dd>
                    </dl> 
                    <dl>
                        <dt>部门名称：</dt>
                        <dd id="p_Depart">
                        </dd>
                    </dl>
                    <dl>
                        <dt>权限值：</dt>
                        <dd>
                            @Html.TextBox("t0_LevelValue", "", new { @class = "required textInput digits", maxlength = "25" })
                        </dd>
                    </dl>
                    <dl>
                        <dt>&nbsp</dt>
                        <dd>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">
                                        添加</button></div>
                            </div>
                        </dd>
                        <dd><a class="button" href='@rturl'><span>返回</span></a></dd>
                    </dl>
                    } 
                }
            </div>
        </div>
    </div>
</div>

<link href="/content/jui-normal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/Scripts/pager.js"></script>
<script type="text/javascript">
    $(function () {
        $('#p_Depart').load('/SysMenu/Departlevel', { v: '@MyRequest.GetQueryString("hostId")' }, function () {
            if (isDWZInit) { initUI('#p_Depart'); }
        });
    });
</script>
